#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int cal(int* arry, int x)
{
    int count = 0, y = 0;
    for (y = 0; y < x - 1; y++)
    {
        count += *arry;
        arry++;
    }
    return count;
}
int main() {
    int a, b = 0, n;
    int number[] = { 0 };
    int* num = number;

    scanf("%d", &n);
    do {
        scanf("%d", &number[b]);
        b++;
    } while (b < n);
    int cal(int* num, int n);
    return 0;
}